package ru.yermak.bookkeeping.common;

import ru.yermak.spring.EventScope;
import ru.yermak.spring.ActionScope;


import javax.swing.*;
import java.awt.event.ActionEvent;

import org.springframework.context.annotation.Scope;

/**
 * User: harrier
 * Date: Aug 26, 2008
 */


public abstract class BookkeepingAction extends AbstractAction {

    public BookkeepingAction(String name) {
        super(name);
    }

    @ActionScope
    public void actionPerformed(ActionEvent e) {
        createCommand().execute(e);
    }


    public abstract Command createCommand();
}
